﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace BanHangCshap.Class.gkhtdl63.DAL
{
    public abstract class Phieuxuat2ChitietDAL:clsBaseDAL
    {
        public DataTable Phieuxuat2Chitiet_LaytheoId_Phieuxuat2(long Id_Phieuxuat2)
        {
            string xlSPName = "sp_Phieuxuat2Chitiet_LaytheoId_Phieuxuat2";
            string[] xlSPPara = { "@Id_Phieuxuat2" };
            object[] xlSPValu = { Id_Phieuxuat2 };
            return base.Select(xlSPName, xlSPPara, xlSPValu);
        }

        public bool Phieuxuat2Chitiet_Them(DAL.Entities.Phieuxuat2Chitiet xlPX2CT)
        {
            string xlSPName = "sp_Phieuxuat2Chitiet_Them";
            string[] xlSPPara = { "@Id_Phieuxuat2"
                                    ,"@Ma_QCBoSanpham"
                                    ,"@DVT"
                                    ,"@Soluong"
                                    ,"@Dongia"
                                    ,"@CK"
                                    ,"@Ghichu"
                                    ,"@Thanhtien"
                                    };
            object[] xlSPValu = { xlPX2CT.Id_Phieuxuat2
                                ,xlPX2CT.Ma_QCBoSanpham
                                ,xlPX2CT.DVT
                                ,xlPX2CT.Soluong
                                ,xlPX2CT.Dongia
                                ,xlPX2CT.CK
                                ,xlPX2CT.Ghichu
                                ,xlPX2CT.Thanhtien
                                 };
            return base.Insert(xlSPName, xlSPPara, xlSPValu);
        }

        public bool Phieuxuat2Chitiet_Xoa(long xlId_Phieuxuat2)
        {
            string xlSPName = "sp_Phieuxuat2Chitiet_Xoa";
            string[] xlSPPara = { "@Id_Phieuxuat2" };
            object[] xlSPValu = { xlId_Phieuxuat2 };
            return base.Delete(xlSPName, xlSPPara, xlSPValu);
        }
    }
}
